import Vue from 'vue'
import Router from 'vue-router'
import login from '@/components/login'
import home from '@/components/home'
import hometop from '@/components/hometop'
import homemain from '@/components/homemain'
import setup from '@/components/setup'
import homeleft from '@/components/homeleft'
import usermanage from '@/components/usermanage'
import datachange from '@/components/datachange'
import alertrecord from '@/components/alertrecord'
import setrecord from '@/components/setrecord'
import processingrecord from '@/components/processingrecord'
import alertparametersetup from '@/components/alertparametersetup'
import alertcount from '@/components/alertcount'
Vue.use(Router)

export default new Router({
  // base: '/monitor/',
  routes: [
    {
      path: '/',
      name: 'login',
      component: login
    },
    {
      path: '/home',
      name: 'home',
      component: home,
      children: [
        {
          path: '/home',
          name: 'home',
          components: {
            top: hometop,
            homeMainModule: homemain,
            left: homeleft
          }
        },
        {
          path: '/setup',
          name: 'setup',
          components: {
            top: hometop,
            left: homeleft,
            homeMainModule: setup
          }
        },
        {
          path: '/usermanage',
          name: 'usermanage',
          components: {
            top: hometop,
            left: homeleft,
            homeMainModule: usermanage
          }
        },
        {
          path: '/datachange',
          name: 'datachange',
          components: {
            top: hometop,
            left: homeleft,
            homeMainModule: datachange
          }
        },
        {
          path: '/alertrecord',
          name: 'alertrecord',
          components: {
            top: hometop,
            left: homeleft,
            homeMainModule: alertrecord
          }
        },
        {
          path: '/setrecord',
          name: 'setrecord',
          components: {
            top: hometop,
            left: homeleft,
            homeMainModule: setrecord
          }
        },
        {
          path: '/processingrecord',
          name: 'processingrecord',
          components: {
            top: hometop,
            left: homeleft,
            homeMainModule: processingrecord
          }
        },
        {
          path: '/alertparametersetup',
          name: 'alertparametersetup',
          components: {
            top: hometop,
            left: homeleft,
            homeMainModule: alertparametersetup
          }
        },
        {
          path: '/alertcount',
          name: 'alertcount',
          components: {
            top: hometop,
            left: homeleft,
            homeMainModule: alertcount
          }
        }
      ]
    }
  ]
})
